<?php
/**
 * Created by PhpStorm.
 * User: cape
 * Date: 2017/10/10
 * Time: 13:46
 */

trait Hello{
    public function sayHello(){

    }
}

trait World{
    public function sayWorld(){
        echo 'World';
    }
}


class MyHelloWorld{
    use Hello, World;
    public function sayExclamationMark(){
        echo '|';
    }
}


$o = new MyHelloWorld();
$o->sayHello();
$o->sayWorld();
$o->sayExclamationMark();

















